Skip to content

Conversation

jamillambert
Copy link
Collaborator

enumeratesigners is implemented but not tested. Also the v22 help is not correct, it gives incorrect field names which were implemented in the struct. They are correct in v23 and onwards help.

  • Fix the v22 struct names.
  • Add a test and update the types table.

The v22 help is not correct, it gives incorrect field names. They are
correct in v23.

Fix the v22 struct to match the correct names in v23.
`enumeratesigners` is implemented but not tested.

Add a test and update the types table.
@jamillambert jamillambert changed the title gTest enumeratesigners` Test enumeratesigners Aug 27, 2025
use std::os::unix::fs::PermissionsExt;
std::fs::set_permissions(&script_path, std::fs::Permissions::from_mode(0o755))
.expect("chmod");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments:

  • This using tabs, can we use spaces please (tabs vs spaces is a age old religious war - I'm on team spaces).
  • Line 18 has trailing whitespace
  • Perhaps add a code comment saying "Script needs to be executable" or some such thing
  • Perhaps a code comment on the script_body - I have no idea why the script is as it is?
  • Its not clear to me what happens if this test is run on non-unix machine. I don't actually care about non-unix machines though, maybe put the cfg on the whole test to make it clear we only support UNIX for this test.

let node = Node::with_wallet(Wallet::None, &[&signer_arg]);
let json: EnumerateSigners = node.client.enumerate_signers().expect("enumeratesigners");

assert_eq!(json.signers[0].fingerprint, "deadbeef");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As in other comment, better to use first than the array access. In idiomatic Rust array access is only used if there is a good reason to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants